@echo off
echo ========================================
echo Stopping SmartCode Services
echo ========================================

REM 查找并终止所有Java进程（仅限开发环境使用）
for /f "tokens=5" %%a in ('netstat -aon ^| findstr "8080"') do taskkill /F /PID %%a
for /f "tokens=5" %%a in ('netstat -aon ^| findstr "8081"') do taskkill /F /PID %%a
for /f "tokens=5" %%a in ('netstat -aon ^| findstr "8082"') do taskkill /F /PID %%a
for /f "tokens=5" %%a in ('netstat -aon ^| findstr "8083"') do taskkill /F /PID %%a
for /f "tokens=5" %%a in ('netstat -aon ^| findstr "8084"') do taskkill /F /PID %%a
for /f "tokens=5" %%a in ('netstat -aon ^| findstr "8085"') do taskkill /F /PID %%a
for /f "tokens=5" %%a in ('netstat -aon ^| findstr "8086"') do taskkill /F /PID %%a

echo ========================================
echo All services stopped
echo ========================================
pause

